package com.zhl.config;

import feign.Feign;
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext;
import org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext;
import org.springframework.cloud.openfeign.Targeter;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.web.servlet.DispatcherServlet;

public class GrobalFeignConfigure {

//    @Bean
//    public CustomBeanFactoryPostProcessor CustomBeanFactoryPostProcessor(){
//        return new CustomBeanFactoryPostProcessor();
//    }

    @Bean
    public CustomBeanDefinitionRegistryProcessor customBeanDefinitionRegistryProcessor(){
        return new CustomBeanDefinitionRegistryProcessor();
    }

//    @Bean
//    @ApplicationContextIdCondition("123")
//    public Targeter localFeignTargeter(AnnotationConfigApplicationContext context, DispatcherServlet dispatcherServlet){
//        return new LocalFeignTargeter(dispatcherServlet);
//
//    }
//
//    @Bean
//    @ApplicationContextIdCondition("123")
//    public Feign.Builder build(AnnotationConfigApplicationContext context){
//        return FeignLocal.builder();
//    }
}
